<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Hibernate Demo</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .container {
            max-width: 1200px;
            margin-top: 30px;
        }
        .card {
            margin-bottom: 20px;
        }
        pre {
            background-color: #f8f9fa;
            padding: 10px;
            border-radius: 5px;
        }
        .btn-group {
            margin-bottom: 15px;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1 class="mb-4">Spring Boot 3 + Hibernate + MySQL 示例</h1>
        
        <div class="row">
            <div class="col-md-3">
                <div class="list-group">
                    <a href="#" class="list-group-item list-group-item-action active" id="departments-link">部门管理</a>
                    <a href="#" class="list-group-item list-group-item-action" id="employees-link">员工管理</a>
                    <a href="#" class="list-group-item list-group-item-action" id="projects-link">项目管理</a>
                    <a href="#" class="list-group-item list-group-item-action" id="products-link">产品管理</a>
                    <a href="#" class="list-group-item list-group-item-action" id="orders-link">订单管理</a>
                    <a href="#" class="list-group-item list-group-item-action" id="payments-link">支付管理</a>
                    <a href="#" class="list-group-item list-group-item-action" id="hibernate-examples-link">Hibernate示例</a>
                </div>
            </div>
            
            <div class="col-md-9">
                <div class="card">
                    <div class="card-header">
                        <h5 id="section-title">部门管理</h5>
                    </div>
                    <div class="card-body">
                        <div class="btn-group" role="group">
                            <button type="button" class="btn btn-primary" id="fetch-data">获取数据</button>
                            <button type="button" class="btn btn-success" id="create-item">创建</button>
                            <button type="button" class="btn btn-warning" id="update-item">更新</button>
                            <button type="button" class="btn btn-danger" id="delete-item">删除</button>
                        </div>
                        
                        <div id="result-container">
                            <pre id="result-display">点击上方按钮执行操作...</pre>
                        </div>
                    </div>
                </div>
                
                <div class="card" id="hibernate-examples-card" style="display: none;">
                    <div class="card-header">
                        <h5>Hibernate 高级功能示例</h5>
                    </div>
                    <div class="card-body">
                        <div class="btn-group" role="group">
                            <button type="button" class="btn btn-info" id="session-demo">会话与缓存</button>
                            <button type="button" class="btn btn-info" id="hql-demo">HQL查询</button>
                            <button type="button" class="btn btn-info" id="criteria-demo">Criteria API</button>
                            <button type="button" class="btn btn-info" id="entity-lifecycle-demo">实体生命周期</button>
                            <button type="button" class="btn btn-info" id="relationship-demo">关系管理</button>
                        </div>
                        
                        <div class="mt-3">
                            <div class="btn-group" role="group">
                                <button type="button" class="btn btn-secondary" id="batch-insert">批量插入</button>
                                <button type="button" class="btn btn-secondary" id="batch-update">批量更新</button>
                                <button type="button" class="btn btn-secondary" id="batch-delete">批量删除</button>
                                <button type="button" class="btn btn-secondary" id="pagination">分页查询</button>
                            </div>
                        </div>
                        
                        <div id="hibernate-result-container" class="mt-3">
                            <pre id="hibernate-result-display">点击上方按钮执行Hibernate示例...</pre>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script src="js/app.js"></script>
</body>
</html>